<nav class="navbar navbar-default">
	<div class="container-fluid">
		<div class="navbar-header">
			<div class="container">
				<div class="row">
					<div class="span6">
						<ul class="nav nav-tabs">
							<li class="active"><a href="#" k="1">主空间</a></li>
							<li class=""><a href="#" k="1">空间管理</a></li>
							<li class="dropdown" k="2"><a class="dropdown-toggle"
								data-toggle="dropdown" href="#" k="1">任务管理<b
									class="caret"></b></a>
								<ul class="dropdown-menu">
									<li><a href="#">年度计划</a></li>
									<li><a href="#">周度计划</a></li>
									<li><a href="#">周度计划</a></li>
									<li><a href="#">每日计划</a></li>
								</ul></li>
							<li class=""><a href="#" k="1">用户管理</a></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<div class="navbar-header">
			<a class="navbar-brand" title="logoTitle" href="#">Vplans View</a>
		</div>
		<div class="collapse navbar-collapse">
			<ul class="nav navbar-nav navbar-right">
				<li role="presentation"><a href="#">当前用户：<span
						class="badge">TestUser</span></a></li>
				<li><a href="../login/logout"> <span
						class="glyphicon glyphicon-lock"></span>退出登录
				</a></li>
			</ul>
		</div>

	</div>
</nav>
<script type="text/javascript">
$(function(){
	$(".nav-tabs li a[k=1]").on("click",function(){
		var ifDropdown = $(this).parent().attr("class");
		if(ifDropdown.indexOf("dropdown")>=0){
		
		}else{
			$(".nav-tabs li").removeClass("active");
			$(this).parent().addClass("active"); 
		}
	});
	$(".dropdown-menu a").on("click",function(){
		$(".nav-tabs li").removeClass("active");
		$(this).parents("li[k=2]").addClass("active");
	});
});
</script>